<template>
    <div>

        <template v-if="Detail">
            <template v-if="Detail.product_img_wx">
                <div>
                    <SwiperHeader :min_price="Detail.min_price" :mark="Detail.mark" :subtitle="Detail.subtitle" :title="Detail.title" :product_img_wx="Detail.product_img_wx"></SwiperHeader>
                    <!-- <van-sticky :offset-top="30">
                        <div style="padding: 0.2rem 0; background-color:#F5F5F5;">
                                <div style="padding: 0 0.18rem;background-color: #FFFFFF;">
                                        {{Detail.group_list}}
                                </div>
                        </div>
                    </van-sticky> -->
                    <Feature :high_feature="Detail.high_feature"></Feature>
                </div>
            </template>
        </template>

        <template v-if="Detail.title">
            <ProduuctNav :path="path" :title="Detail.title"></ProduuctNav>
        </template>
    </div>
</template>

<script>
import SwiperHeader from "../components/ProduuctDetail/SwiperHeader.vue";
import ProduuctNav from "../components/ProduuctDetail/ProduuctNav.vue";
import Feature from "../components/ProduuctDetail/Feature.vue";
export default {
    components: { SwiperHeader, ProduuctNav, Feature },
    data() {
        return {
            Detail: {},
            path: "",
        };
    },
    async created() {
        let data = await this.$API.ProductDetail.GetProductDetailProduct_id(
            this.$route.params
        );
        console.log(data.data);
        this.Detail = data.data;
    },
    beforeRouteEnter(to, from, next) {
        // ...
        console.log(from);
        next((vm) => {
            vm.path = from.path;
        });
    },
};
</script>

<style scoped>

</style>